1 Setup and Data

## Reading layer `geoBoundaries-TUR-ADM0_simplified' from data source 
##   `/Users/sbamba/Documents/Duke/Spring 2023/ENV 872/Final Project/BambaOrozcoSajewski_ENV872_EDA_FinalProject/Data/Shapefiles/geoBoundaries-TUR-ADM0-all/geoBoundaries-TUR-ADM0_simplified.shp' 
##   using driver `ESRI Shapefile'
## Simple feature collection with 1 feature and 5 fields
## Geometry type: MULTIPOLYGON
## Dimension:     XY
## Bounding box:  xmin: 25.66545 ymin: 35.80768 xmax: 44.81766 ymax: 42.1048
## Geodetic CRS:  WGS 84
## Reading layer `geoBoundaries-TUR-ADM1_simplified' from data source 
##   `/Users/sbamba/Documents/Duke/Spring 2023/ENV 872/Final Project/BambaOrozcoSajewski_ENV872_EDA_FinalProject/Data/Shapefiles/geoBoundaries-TUR-ADM1-all/geoBoundaries-TUR-ADM1_simplified.shp' 
##   using driver `ESRI Shapefile'
## Simple feature collection with 81 features and 5 fields
## Geometry type: MULTIPOLYGON
## Dimension:     XY
## Bounding box:  xmin: 25.66545 ymin: 35.80768 xmax: 44.81766 ymax: 42.1048
## Geodetic CRS:  WGS 84
## Reading layer `geoBoundaries-TUR-ADM2_simplified' from data source 
##   `/Users/sbamba/Documents/Duke/Spring 2023/ENV 872/Final Project/BambaOrozcoSajewski_ENV872_EDA_FinalProject/Data/Shapefiles/geoBoundaries-TUR-ADM2-all/geoBoundaries-TUR-ADM2_simplified.shp' 
##   using driver `ESRI Shapefile'
## Simple feature collection with 973 features and 5 fields
## Geometry type: MULTIPOLYGON
## Dimension:     XY
## Bounding box:  xmin: 25.66545 ymin: 35.80805 xmax: 44.81766 ymax: 42.1048
## Geodetic CRS:  WGS 84

2 Rationale and Research Questions

On February 6, 2023 a 7.8 magnitude earthquake hit northwest section Gaziantep, it’s epicenter near the town of Nurdağı.Less than 12 hours later another 7.5 magnitude earthquake the neighboring province of Kahramanmaraş. The earthquakes had severe damaging impacts in 11 provinces of southeast Türkiye as well as northwest Syria, including in the cities of Idlib and Aleppo, and their effects were felt as far away as Lebanon, Palestine, and Egypt. Strong aftershocks from the earthquakes lasted for more than a month (Kawoosa, 2023), leading to the continued destruction of buildings already damaged in the initial earthquakes. Some aftershocks are still occurring today.

The earthquakes caused more than 55,000 people were killed and more than 130,000 people were injured across Türkiye and Syria as a result of the earthquakes, and tens of thousands of people are missing and millions displaced.

To learn more about some of the impacts of the earthquake we decided to examine the distribution and characteristics of 2023 Türkiye-Syria earthquakes and their aftershocks within the borders of Türkiye to understand the relationship between earthquake magnitude and depth using GLMs and visually compares the occurrence of building destruction with these earthquake variables as well as the human response to the destruction, as represented by twitter activity.

To conduct this analysis we used data from the USGS Earthquake Catalog on the earthquakes and data from the UN Office of Humanitarian Affairs’ Humanitarian Data Exchange portal on building damage and twitter activity. We also used administrative boundary data from the geoBoundaries package created by the College of William and Mary’s geoLab.

2.0.1 Research Questions:

  1. How is earthquake depth correlated to earthquake magnitude?
  2. How are depth and magnitude related to destruction of buildings?
  3. What is the distribution of earthquake-related twitter activity?
  4. How does this distribution look in relation to the distribution of destroyed buildings?

3 Dataset Information

This project used four main datasets: Administrative Boundary Layers, Earthquake Data, Destroyed Buildings Data, and Twitter Activity Data.

The Administrative Boundary Layers were downloaded from the geoBoundaries dataset created by the geoLab at the College of William and Mary. Administrative boundaries for the country, province, and district level were downloaded and saved as shapefiles.

The Earthquake Data was downloaded from the US Geological Survey Earthquake Catalog using their API. It is saved in a csv format and is a point layer of earthquake data from February 5 to march 5, 2023. The dataset includes measures of depth, magnitude, time, latitude, and longitude as well as other statistics related to measuring and detection errors.

The Destroyed Buildings Data was pulled from the UN Office of UN Office of Humanitarian Affairs’ Humanitarian Data Exchange Portal. It is saved in a csv format and is a point layer of destroyed building data that is updated daily and curated using Open Street Map and Map Roulette.

The Twitter Activity Data was pulled from the UN Office of UN Office of Humanitarian Affairs’ Humanitarian Data Exchange Portal. It is saved in a xlsx format and is tabular data aggregated from points to administrative level 2 (distric) polygons. It includes separate files of missing people reports, help requests, shelter requests, and damage reports shared through images.

Because of the very specific nature of the datasets and the spatial analysis conducted, the data did not require serious wrangling. Some datasets, such as the Earthquake dataset, were wrangled and processed to create new data and time columns using lubridate and sometimes datasets, such as the administrative boundary layers and the Earthquake dataset, were reprojected to allow for spatial analayes, such as interpolation.

Table 3.1 shows a summary of the dataset information.

# create data frame of data set information
datasets <- c("Administrative Boundary Layers", "Earthquake Data", "Destroyed Buildings Data", "Twitter Activity Data")
description <- c("polygons", "points", "points", "points aggregated to ADM 2 polygons")
variables <- c("name; type (ADM level); geometry", "date/time; latitude; longitude; depth (km); magnitude; place; measures of error; measurement sources; ID", "source; damage_event; date; longigute; latitude", "district; population; frequency of images; frequency of tweets; impact score; impact category")
information <- c("ADM 0, ADM 1, and ADM 2", "earthquakes Feb. 5-Mar. 5, 2023", "destroyed buildings", "help requests, shelter requests, missing people reports, damage reports (images)")
projection <- c("4326", "4326", "4326", "NA")
format <- c("shapefile", ".csv", ".csv", ".xlsx")
sources <- c("geoBoundaries", "USGS Earthquake Catalog", "UN OCHA HDX", "UN OCHA HDX")

datasets.df <- data.frame(datasets, description, variables, information, projection, format, sources)

#Use the `kable` function to produce the table
knitr::kable(datasets.df, caption = "Summary of Datasets", col.names = c("Name","Description", "Variables", "Information", "Original Projection", "Format", "Source"))
Table 3.1: Summary of Datasets
Name Description Variables Information Original Projection Format Source
Administrative Boundary Layers polygons name; type (ADM level); geometry ADM 0, ADM 1, and ADM 2 4326 shapefile geoBoundaries
Earthquake Data points date/time; latitude; longitude; depth (km); magnitude; place; measures of error; measurement sources; ID earthquakes Feb. 5-Mar. 5, 2023 4326 .csv USGS Earthquake Catalog
Destroyed Buildings Data points source; damage_event; date; longigute; latitude destroyed buildings 4326 .csv UN OCHA HDX
Twitter Activity Data points aggregated to ADM 2 polygons district; population; frequency of images; frequency of tweets; impact score; impact category help requests, shelter requests, missing people reports, damage reports (images) NA .xlsx UN OCHA HDX

4 Exploratory Analysis

The map below shows extent of Turkiye within which our analysis of the earthquake related data will take place. Moreover, the administrative boundaries for provinces and districts are shown with their labels. This will aid in situating the earthquake, damage, and twitter data within the affected 11 provinces and their relevant districts.

## Administrative Boundaries
# plot and check administrative boundaries
mapviewOptions(basemaps = "CartoDB.Positron")
mapView(list(tur.adm0, tur.adm1, tur.adm2), 
        col.regions = list("lightblue","lavender", "darkgreen"),
        label = list(as.character(tur.adm0$shapeName), as.character(tur.adm1$shapeName), as.character(tur.adm2$shapeName)),
        layer.name = list("Turkiye", "Turkiye Provinces", "Turkiye Districts"))

Figure 4.1 below illustrates the rough distribution of the earthquakes that occurred between February 5 and March 5, 2023. The earthquakes occurred in a large south to north swath from Hatay to the Black Sea region, with most of the earthquakes concentrating in the South, particularly near Hatay, Gaziantep, Şanlıurfa, and Kahramanmaraş.

## Earthquake Data
# preview data
head(EQC.data.df)
##                       time latitude longitude  depth mag magType nst gap  dmin
## 1 2023-03-04T05:27:34.779Z  38.0299   38.2134  2.860 4.2      mb  35  82 0.760
## 2 2023-03-03T02:53:43.065Z  37.8395   36.7004  7.120 5.0     mww  85  26 0.369
## 3 2023-03-02T13:35:54.000Z  38.2315   38.1119  6.914 3.4      ml  16  70 0.878
## 4 2023-03-01T16:37:59.849Z  37.2659   37.0676  9.357 4.4      mb  39 104 0.147
## 5 2023-03-01T07:20:23.043Z  36.3065   36.0970 10.000 4.7      mb  87  66 1.243
## 6 2023-03-01T04:15:31.399Z  37.7611   37.8869 10.000 4.3      mb  31 109 0.798
##    rms net         id                  updated                        place
## 1 0.71  us us7000jh8x 2023-03-16T08:38:54.318Z               eastern Turkey
## 2 0.90  us us7000jgyv 2023-03-23T22:48:22.484Z   26 km SE of Göksun, Turkey
## 3 0.71  us us7000jgt5 2023-03-26T14:51:15.317Z               eastern Turkey
## 4 0.78  us us7000jgly 2023-03-21T23:38:09.040Z 31 km ENE of Nurda??, Turkey
## 5 0.92  us us7000jgic 2023-04-12T13:03:34.040Z    7 km W of Anayazi, Turkey
## 6 0.74  us us7000jgev 2023-04-06T03:55:42.040Z       4 km SW of Tut, Turkey
##         type horizontalError depthError magError magNst   status locationSource
## 1 earthquake            4.71      5.136    0.147     13 reviewed             us
## 2 earthquake            5.78      3.331    0.059     28 reviewed             us
## 3 earthquake            1.65      7.730    0.069     28 reviewed             us
## 4 earthquake            5.27      2.865    0.138     15 reviewed             us
## 5 earthquake            5.57      1.840    0.072     58 reviewed             us
## 6 earthquake            2.28      1.952    0.218      6 reviewed             us
##   magSource
## 1        us
## 2        us
## 3        us
## 4        us
## 5        us
## 6        us
# plot earthquake points to see quick distribution
ggplot()+
  geom_sf(data = tur.adm0, fill = "azure", color = "darkgray") +
  geom_point(data = EQC.data.df, aes(x=latitude, y=longitude), color = "darkred", size = 0.5) +
  labs(title = "Turkiye Earthquakes Feb. 5-Mar. 5, 2023")
Distirbution of Earthquake Points

Figure 4.1: Distirbution of Earthquake Points

Figure 4.2 below illustrates the rough distribution of buildings destroyed as a result of the earthquakes. Unlike the distribution of the earthquakes that occurred in a large south to north swath, the destroyed buildings are largely concentrated around areas near the epicenters of the largest 7.8 and 7.5 magnitude earthquakes that occurred in Gaziantep and KahramanmaraÅŸ, respectively. The destroyed buildings dataset contains 3277 points, but there appears to be very few on the map, likely due to the concentration of destroyed buildings at specific locations.

## Destroyed Building Data
# dataset summary
summary(buildings)
##      osm_id             source          damage_event       damage_date       
##  Min.   :9.167e+07   Length:3277        Length:3277        Length:3277       
##  1st Qu.:1.139e+09   Class :character   Class :character   Class :character  
##  Median :1.140e+09   Mode  :character   Mode  :character   Mode  :character  
##  Mean   :1.085e+09                                                           
##  3rd Qu.:1.143e+09                                                           
##  Max.   :1.155e+09                                                           
##      name           damage_type        destroyed_building addr_full     
##  Length:3277        Length:3277        Length:3277        Mode:logical  
##  Class :character   Class :character   Class :character   NA's:3277     
##  Mode  :character   Mode  :character   Mode  :character                 
##                                                                         
##                                                                         
##                                                                         
##  addr_housenumber    addr_city           building         addr_street       
##  Length:3277        Length:3277        Length:3277        Length:3277       
##  Class :character   Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character   Mode  :character  
##                                                                             
##                                                                             
##                                                                             
##    longitude        latitude      geom_type        
##  Min.   :35.28   Min.   :36.03   Length:3277       
##  1st Qu.:36.25   1st Qu.:36.47   Class :character  
##  Median :36.71   Median :37.13   Mode  :character  
##  Mean   :36.84   Mean   :37.02                     
##  3rd Qu.:36.93   3rd Qu.:37.58                     
##  Max.   :38.31   Max.   :38.25
# plot destroyed buildings points to see quick distribution
ggplot()+
  geom_sf(data = tur.adm0, fill = "azure", color = "darkgray") +
  geom_point(data = buildings, aes(x=latitude, y=longitude), color = "darkorange3", size = 0.5) +
  labs(title = "Turkiye: Buildings Destroyed in Earthquakes")
Distribution of Destroyed Building Points

Figure 4.2: Distribution of Destroyed Building Points

5 Analysis

6 Summary and Conclusions

7 References

Administrative boundaries courtesy of geoBoundaries

Kawoosa, V.M. (2023, March 1). How Turkey has been inundated with aftershocks. Reuters. https://www.reuters.com/graphics/TURKEY-QUAKE/AFTERSHOCKS/dwpkdzklevm/